<?php
/**
 * User: xuhong
 * Date: 2018/10/30
 */

namespace extend\wechat\mp;


class User
{

    /**
     * 获取用户信息
     * @param $openid
     * @return mixed
     */
    public static function getUserInfo($openid)
    {
        $access_token = Voucher::accessToken()['access_token'];
        $url = "https://api.weixin.qq.com/cgi-bin/user/info?access_token={$access_token}&openid={$openid}&lang=zh_CN";
        return getRequest($url);
    }

}